package a05_mediator;

public class Client {

	public static void main(String []args){
		AbstractColleague ca = new ColleagueA();
		ca.setName("ca");
		AbstractColleague cb = new ColleagueB();
		cb.setName("cb");
		System.out.println("----after setName(name)-----");
		System.out.println("ca name:"+ca.getName());
		System.out.println("cb name:"+cb.getName());
		Mediator m = new ConcreteMediator(ca, cb);
		ca.setName("new Ca", m);
		System.out.println("----after ca.setName(name, m)-----");
		System.out.println("ca name:"+ca.getName());
		System.out.println("cb name:"+cb.getName());
		cb.setName("new cb", m);
		System.out.println("----after cb.setName(name, m)-----");
		System.out.println("ca name:"+ca.getName());
		System.out.println("cb name:"+cb.getName());
	}
}
